import QtQuick 1.0

Image {
    id:root
    width: 73
    height: 28
    source: "../gfx/button-switch-background.png"
    property bool state: false


    Image {
        x:root.state ? width : 0
        width: 37
        height: 28
        source: "../gfx/button-switch-hide.png"

        Behavior on x {
            PropertyAnimation {duration: 100}
        }
    }


    MouseArea{
        anchors.fill: parent
        onClicked: root.state = !root.state

    }
}
